package service

import (
	"BiYeProServer/src/model"
	"BiYeProServer/src/model/dao"
	"BiYeProServer/src/util"
	"github.com/gin-gonic/gin"
)

func GetLunbo(ctx *gin.Context)  {
	var lunbos []model.Lunbo
	dao.GetDb().Find(&lunbos).Limit(4)
	if len(lunbos) == 0{
		util.SetResponse(ctx,5004,false,nil,"查询轮播图失败")
		return
	}
	util.SetResponse(ctx,200,true,lunbos,"查询成功")
}
